/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function initFuncionesGrid(){
    $("#funcion_grid").jqGrid({
        datatype: "local",
        width:900,
 colNames:['Id','Funcion','Descripcion'],
        colModel:[
        {
            name:'id',
            index:'id',
            sortable: true, 
            editable: true,  
            editoptions:{readonly: true},
            hidden: true , 
            editable: true, 
            width:55
        }
        ,{
            name:'funcion',
            index:'funcion',
            sortable: true, 
            editable: true,       
            editoptions:{readonly: false},        
            width:55
        }
        ,{
            name:'descripcion',
            index:'descripcion',
            sortable: true, 
            editable: true,       
            editoptions:{readonly: false},        
            width:55
        }
        
     ],
        ondblClickRow: function(bancoid){
           // alert(bancoid)    
               
        },
        rowNum:10,
        rowList:[10,20,30],
        pager: '#funcion_pager',
        sortname: 'marcaid',
        viewrecords: true,
        sortable: true,
        sortorder: "desc",
        multiselect: true,
        caption:"Administrador de marcas",
        loadonce : false,
        rowTotal: 'total',
        records:'records',
        jsonReader: {
            repeatitems: false,
            id: "marcaid"
        }
    });
    $("#funcion_grid").jqGrid('navGrid','#funcion_pager',{
        edit:true,
        add:true,
        del:true,
        view :false,
        search: false 
    },{closeAfterEdit:true,url:'adcMarcas.do?action=edit'},{closeAfterAdd:true,url:'adcMarcas.do?action=add'},{url:'adcMarcas.do?action=del'});
      //{closeAfterEdit:true});

}

